package com.sysmanage.etl.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ETL_PROPERTY")
public class ETL_Property implements Serializable {
	private static final long serialVersionUID = -2172808931932744982L;
	/** 主键ID */
	private Integer property_id;
	/** 字段名 */
	private String property_name;
	/** 字段类型 */
	private String property_type;
	/** java对应类型 */
	private String property_classType;
	/** 字段别名 */
	private String property_alias;
	/** 字段描述 */
	private String property_desc;
	/** 是否为主键 */
	private Boolean property_isPrimaryKey;
	/** 是否为外键 */
	private Boolean property_isForeignKey;
	/** 是否自动生成 */
	private Boolean property_isAutoIncrement;
	/** 是否为重复依据 */
	private Boolean property_isRepeat;
	/** 字段长度 */
	private Integer property_columnSize;
	/** 是否允许为空 */
	private Boolean property_Null;
	/** 字段默认值 */
	private String property_defaultValue;
	/** 字段精度 */
	private Integer property_precision;
	/** 字段是否还存在于数据表 */
	private Boolean property_exists = true;
	/** 所属数据表 */
	private ETL_Table table;

	@Id
	@GeneratedValue
	@Column(name = "PROPERTY_ID")
	public Integer getProperty_id() {
		return property_id;
	}

	public void setProperty_id(Integer property_id) {
		this.property_id = property_id;
	}

	@Column(name = "PROPERTY_NAME")
	public String getProperty_name() {
		return property_name;
	}

	public void setProperty_name(String property_name) {
		this.property_name = property_name;
	}

	@Column(name = "PROPERTY_TYPE")
	public String getProperty_type() {
		return property_type;
	}

	public void setProperty_type(String property_type) {
		this.property_type = property_type;
	}

	@Column(name = "PROPERTY_ALIAS")
	public String getProperty_alias() {
		return property_alias;
	}

	public void setProperty_alias(String property_alias) {
		this.property_alias = property_alias;
	}

	@Column(name = "PROPERTY_DESC")
	public String getProperty_desc() {
		return property_desc;
	}

	public void setProperty_desc(String property_desc) {
		this.property_desc = property_desc;
	}

	@Column(name = "PROPERTY_ISPRIMARYKEY")
	public Boolean getProperty_isPrimaryKey() {
		return property_isPrimaryKey;
	}

	public void setProperty_isPrimaryKey(Boolean property_isPrimaryKey) {
		this.property_isPrimaryKey = property_isPrimaryKey;
	}

	@Column(name = "PROPERTY_NULL")
	public Boolean getProperty_Null() {
		return property_Null;
	}

	public void setProperty_Null(Boolean property_Null) {
		this.property_Null = property_Null;
	}

	@Column(name = "PROPERTY_DEFAULTVALUE")
	public String getProperty_defaultValue() {
		return property_defaultValue;
	}

	public void setProperty_defaultValue(String property_defaultValue) {
		this.property_defaultValue = property_defaultValue;
	}

	@Column(name = "PROPERTY_CLASSTYPE")
	public String getProperty_classType() {
		return property_classType;
	}

	public void setProperty_classType(String property_classType) {
		this.property_classType = property_classType;
	}

	@Column(name = "PROPERTY_COLUMNSIZE")
	public Integer getProperty_columnSize() {
		return property_columnSize;
	}

	public void setProperty_columnSize(Integer property_columnSize) {
		this.property_columnSize = property_columnSize;
	}

	@Column(name = "PROPERTY_ISAUTOINCREMENT")
	public Boolean getProperty_isAutoIncrement() {
		return property_isAutoIncrement;
	}

	public void setProperty_isAutoIncrement(Boolean property_isAutoIncrement) {
		this.property_isAutoIncrement = property_isAutoIncrement;
	}

	@Column(name = "PROPERTY_PRECISION")
	public Integer getProperty_precision() {
		return property_precision;
	}

	public void setProperty_precision(Integer property_precision) {
		this.property_precision = property_precision;
	}

	@ManyToOne
	@JoinColumn(name = "TABLE_ID")
	public ETL_Table getTable() {
		return table;
	}

	public void setTable(ETL_Table table) {
		this.table = table;
	}

	@Column(name = "PROPERTY_ISFOREIGNKEY")
	public Boolean getProperty_isForeignKey() {
		return property_isForeignKey;
	}

	public void setProperty_isForeignKey(Boolean property_isForeignKey) {
		this.property_isForeignKey = property_isForeignKey;
	}

	@Column(name = "PROPERTY_ISREPEAT")
	public Boolean getProperty_isRepeat() {
		return property_isRepeat;
	}

	public void setProperty_isRepeat(Boolean property_isRepeat) {
		this.property_isRepeat = property_isRepeat;
	}
	
	@Column(name = "PROPERTY_EXISTS")
	public Boolean getProperty_exists() {
		return property_exists;
	}

	public void setProperty_exists(Boolean property_exists) {
		this.property_exists = property_exists;
	}

}
